#ifndef DEBUG_HPP
#define DEBUG_HPP

//http://patrick.wagstrom.net/old/misc/dotfiles/dotbash_profile.html
#define BLACK         "\033[0;30m"
#define RED           "\033[0;31m"
#define GREEN         "\033[0;32m"
#define BROWN         "\033[0;33m"
#define BLUE          "\033[0;34m"
#define MAGENTA       "\033[0;35m"
#define CYAN          "\033[0;36m"
#define WHITE         "\033[0;37m"
#define LIGHTBLACK    "\033[1;30m"
#define LIGHTRED      "\033[1;31m"
#define LIGHTGREEN    "\033[1;32m"
#define YELLOW        "\033[1;33m"
#define LIGHTBLUE     "\033[1;34m"
#define LIGHTMAGENTA  "\033[1;35m"
#define LIGHTCYAN     "\033[1;36m"
#define LIGHTWHITE    "\033[1;37m"



#define ERROR(message)   std::cerr << RED <<#message << "\n"<< WHITE<< "\n"; 
  
#ifdef DEBUG

// Asserts expr expression, if false exits with error
#define ASSERT(expr, message) \
	if (!(expr))\
	{\
	std::cout << RED << "\nASSERT" << #expr << #message; \
	std::cout << "\nOn line " << __LINE__ ;\
	std::cout << "\nIn file " << __FILE__ << "\n"<< WHITE << "\n";\
	exit(EXIT_FAILURE);\
	}

#define INFO(message)  std::cout << GREEN << "\n INFORMATION " <<#message << "\nOn line " << __LINE__ << "\nIn file " << __FILE__ << "\n"<< WHITE<< "\n"; 

#define WARN(message)  std::cout << MAGENTA << "\n WARNING " << #message << "\nOn line " << __LINE__ << "\nIn file " << __FILE__ << "\n"<< WHITE<< "\n"; 
#define WARN2(expr,message,expr3)  std::cout << MAGENTA  << "\n WARNING " << #message << "\nOn line " << expr << "\nIn file " << expr3 << "\n"<< WHITE<< "\n"; 

#else
#define ASSERT(expr,message)
#define INFO(message)
#define WARN(message)    
#define WARN2(expr,message,expr3)              

#endif //DEBUG
#endif // DEBUG_HPP
